home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Cl…Business) - New Member 21 / Software of the Month Club XXI - New Member Business.ISO / mac / Business / Financial Portfolio v4.1 ƒ / Financial Portfolio v4.1 / Financial Portfolio v4.1.rsrc / LENS_202_Conversions.bin < prev    next >
Text File  |  1995-11-23  |  10KB  |  169 lines

  1. ItemType: WIND
  2. Rect: 165,267,443,487
  3. AutoSize: FALSE
  4. Style: Dialog
  5. HasTitleBar: TRUE
  6. HasZoomBox: FALSE
  7. Name: Conversions
  8. Script: --on windowEvent  wdID,wdName,objNo,objName,objValue┬if objValue="Open" then ┬  global changedConversions┬  put "false" into changedConversions -- initialize┬else if objValue="Close" then ┬  ┬else if objValue="Suspend" then ┬  ┬else if objValue="Resume" then ┬  ┬else if objValue="CloseBox" then ┬  ┬else if objValue="ZoomBox" then ┬  ┬else if objValue="GrowBox" then ┬  ┬else if objValue="TitleBar" then ┬  ┬end if┬┬--end windowEvent┬┬┬
  9. Params: i2_Text┬i0_TopLeft
  10. Result: i0_AutoSize
  11.  
  12. ItemType: PUSH
  13. Rect: 104,189,176,209
  14. Name: Done
  15. DefaultItem: TRUE
  16. AutoClose: TRUE
  17.  
  18. ItemType: LIST
  19. Rect: 79,35,196,104
  20. TextFont: Geneva
  21. TextSize: 10
  22. AutoSize: FALSE
  23. Name: typeList
  24. Logic: Single
  25. KeyScroll: TRUE
  26. Text: 
  27. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"typeList","SelectionText")┬if it¡empty then┬  put it into ss┬  wsSet wdID,"picked","Text",ss┬  wsSet wdID,"Rename","Disabled", "false"┬  wsSet wdID,"delete","Disabled", "false"┬  wsSet wdID,"10","Disabled", "false"┬  wsSet wdID,"11","Disabled", "false"┬  get line textToLineNum(ss,fld "cTypes") of fld "cNums"┬  put it into info┬  global cSign┬  put (ss&" = one "&cSign) into qq┬  wsSet wdID,"text1","text",qq┬  put (cSign&" = one "&ss) into qq┬  wsSet wdID,"text2","text",qq┬  if item 2 of info="true" then -- top button hilited┬    wsSet wdID,"10","Hilite", "TRUE"┬    wsSet wdID,"c1","Disabled", "false"┬    wsSet wdID,"c1","Text",item 1 of info┬    wsSet wdID,"c1","selection", "0,100"┬    wsSet wdID,"c2","Text",""┬    wsSet wdID,"c2","disabled","true"┬  else -- bottom button hilited┬    wsSet wdID,"11","Hilite", "TRUE"┬    wsSet wdID,"c2","Disabled", "false"┬    wsSet wdID,"c2","Text",item 1 of info┬    wsSet wdID,"c2","selection", "0,100"┬    wsSet wdID,"c1","Text",""┬    wsSet wdID,"c1","disabled","true"┬  end if┬else┬  wsSet wdID,"Rename","Disabled", "true"┬  wsSet wdID,"delete","Disabled", "true"┬  wsSet wdID,"10","Disabled", "true"┬  wsSet wdID,"11","Disabled", "true"┬  wsSet wdID,"c1","text",""┬  wsSet wdID,"c2","text",""┬  wsSet wdID,"c1","Disabled", "true"┬  wsSet wdID,"c2","Disabled", "true"┬  wsSet wdID,"text1","text",""┬  wsSet wdID,"text2","text",""┬  wsSet wdID,"picked","Text",""┬end if┬--end mouseUp┬┬
  28.  
  29. ItemType: LBL
  30. Rect: 3,2,98,15
  31. TextFont: Geneva
  32. TextSize: 10
  33. TextStyle: Bold
  34. Text: Available Types
  35.  
  36. ItemType: PUSH
  37. Rect: 208,35,268,52
  38. TextFont: Geneva
  39. TextSize: 10
  40. AutoSize: FALSE
  41. Name: New type
  42. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue┬get smallask("Name of new type?")┬if it¡"Ñ" then┬  put it into newName┬  put NTFSqueezeText(fld "cTypes") into tt┬  if newName is not in tt then┬    put return&newName after tt┬    -- don't sort unless co-sort other lists (Flds cTypes & cNums)┬    put NTFSqueezeText(tt) into tt┬    put tt into fld "cTypes"┬    wsSet wdID,"typeList","Text",tt┬    get wsGet(wdID,"type","SelectionText")┬    put it into oldType┬    wsSet wdID,"type","Text",tt┬    wsSet wdID,"type","SelectionText",oldType┬    wsSet wdID,"typeList","SelectionText",newName┬    wsSet wdID,"Rename","Disabled","false"┬    wsSet wdID,"Delete","Disabled","false"┬    wsSet wdID,"10","Disabled", "false"┬    wsSet wdID,"11","Disabled", "false"┬    put newName into ss┬    wsSet wdID,"picked","Text",ss┬    global cSign┬    put (ss&" = one "&cSign) into qq┬    wsSet wdID,"text1","text",qq┬    put (cSign&" = one "&ss) into qq┬    wsSet wdID,"text2","text",qq┬    -- top button hilited as a default┬    wsSet wdID,"10","Hilite", "TRUE"┬    wsSet wdID,"c1","Disabled", "false"┬    wsSet wdID,"c1","Text",""┬    wsSet wdID,"c1","selection", "0,100"┬    wsSet wdID,"c2","Text",""┬    wsSet wdID,"c2","disabled","true"┬  else┬    get errorAns("You already have a type by that name.")┬  end if┬end if┬--end mouseUp
  43.  
  44. ItemType: PUSH
  45. Rect: 208,61,268,78
  46. TextFont: Geneva
  47. TextSize: 10
  48. AutoSize: FALSE
  49. Disabled: TRUE
  50. Name: Rename
  51. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"typeList","SelectionText")┬put it into oldName┬put "New name for ╥"&oldName&"╙?" into qq┬get smallask(qq)┬if it¡"Ñ" then┬  put it into newName┬  put NTFSqueezeText(fld "cTypes") into tt┬  if newName is not in tt then┬    put newName into line textToLineNum(oldName,tt) of tt┬    put FullSort(tt) into tt┬    put tt into fld "cTypes"┬    wsSet wdID,"typeList","Text",tt┬    wsSet wdID,"type","Text",tt┬    wsSet wdID,"typeList","SelectionText",newName┬    global cSign┬    put ("ex.: one "&cSign&" = _____ "&newName) into qq┬    wsSet wdID,"text1","text",qq┬    put ("ex.: one "&newName&" = _____ "&cSign) into qq┬    wsSet wdID,"text2","text",qq┬    wsSet wdID,"picked","text",newName┬    wsSet wdID,"Rename","Disabled", "false"┬    wsSet wdID,"delete","Disabled", "false"┬  else┬    errorAns("You already have a type by that name.")┬  end if┬end if┬--end mouseUp┬
  52.  
  53. ItemType: PUSH
  54. Rect: 208,87,268,104
  55. TextFont: Geneva
  56. TextSize: 10
  57. AutoSize: FALSE
  58. Disabled: TRUE
  59. Name: Delete
  60. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"typeList","SelectionText")┬put it into oldName┬put "Really delete ╥"&oldName&"╙?" into qq┬get smallAns(qq)┬if it="OK" then┬  put fld "cTypes" into tt┬  if oldName is in tt then┬    put textToLineNum(oldName,tt) into liner┬    delete line liner of tt┬    put tt into fld "cTypes"┬    delete line liner of fld "cNums"┬    wsSet wdID,"typeList","Text",tt┬    wsSet wdID,"type","Text",tt┬    wsSet wdID,"typeList","Selection",0┬    wsSet wdID,"Rename","Disabled", "true"┬    wsSet wdID,"delete","Disabled", "true"┬    wsSet wdID,"c1","Text",""┬    wsSet wdID,"c2","Text",""┬    wsSet wdID,"text1","Text",""┬    wsSet wdID,"text2","Text",""┬    wsSet wdID,"c1","disabled","true"┬    wsSet wdID,"c2","disabled","true"┬    wsSet wdID,"picked","Text",""┬  end if┬end if┬--end mouseUp┬
  61.  
  62. ItemType: LBL
  63. Rect: 1,118,64,131
  64. TextFont: Geneva
  65. TextSize: 10
  66. Text: Equivalents:
  67.  
  68. ItemType: TEXT
  69. Rect: 3,281,7,293
  70. TextFont: Geneva
  71. TextSize: 9
  72. Visible: FALSE
  73. Name: picked
  74.  
  75. ItemType: TEXT
  76. Rect: 80,19,201,33
  77. TextFont: Geneva
  78. TextSize: 9
  79. AutoSize: FALSE
  80. Name: instr5
  81. Text: (click on a type to edit it)
  82.  
  83. ItemType: RAD
  84. Rect: 61,118,85,134
  85. Disabled: TRUE
  86. Name: 
  87. Hilite: TRUE
  88. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"10","Hilite")┬if it="true" then┬  wsSet wdID,"c1","text", ""┬  wsSet wdID,"c2","text", ""┬  wsSet wdID,"c1","Disabled", "FALSE"┬  wsSet wdID,"c2","Disabled", "TRUE"┬  wsSet wdID,"c1","selection", "0,10"┬end if┬--end mouseUp┬
  89.  
  90. ItemType: RAD
  91. Rect: 61,140,85,156
  92. Disabled: TRUE
  93. Name: 
  94. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"11","Hilite")┬if it="true" then┬  wsSet wdID,"c1","text", ""┬  wsSet wdID,"c2","text", ""┬  wsSet wdID,"c1","Disabled", "TRUE"┬  wsSet wdID,"c2","Disabled", "False"┬  wsSet wdID,"c2","selection", "0,10"┬end if┬--end mouseUp
  95.  
  96. ItemType: TEXT
  97. Rect: 79,117,153,134
  98. TextFont: Geneva
  99. TextSize: 10
  100. AutoSize: FALSE
  101. Disabled: TRUE
  102. Name: c1
  103. LockText: FALSE
  104. TextAlign: Right
  105. Script: --on closeField  wdID,wdName,objNo,objName,objValue┬-- set this as the value┬get wsGet(wdID,"picked","Text")┬put it into ss┬put fld "cTypes" into tt┬get wsGet(wdID,"c1","Text")┬put stripit(it) into cc┬put textToLineNum(ss,tt) into liner┬put cc into line liner of fld "cNums"┬get wsGet(wdID,"10","Hilite")┬put comma&it after line liner of fld "cNums" -- hilite of top button┬global changedConversions┬put "true" into changedConversions┬--end closeField
  106.  
  107. ItemType: TEXT
  108. Rect: 79,139,153,157
  109. TextFont: Geneva
  110. TextSize: 10
  111. AutoSize: FALSE
  112. Disabled: TRUE
  113. Name: c2
  114. LockText: FALSE
  115. TextAlign: Right
  116. Script: --on closeField  wdID,wdName,objNo,objName,objValue┬-- set this as the value┬get wsGet(wdID,"picked","Text")┬put it into ss┬put fld "cTypes" into tt┬get wsGet(wdID,"c2","Text")┬put stripit(it) into cc┬put textToLineNum(ss,tt) into liner┬put cc into line liner of fld "cNums"┬get wsGet(wdID,"10","Hilite")┬put comma&it after line liner of fld "cNums" -- hilite of top button┬global changedConversions┬put "true" into changedConversions┬--end closeField
  117.  
  118. ItemType: TEXT
  119. Rect: 156,119,160,132
  120. TextFont: Geneva
  121. TextSize: 10
  122. Name: text1
  123. Balloon: This demonstrates the equivalent.
  124.  
  125. ItemType: TEXT
  126. Rect: 156,141,160,154
  127. TextFont: Geneva
  128. TextSize: 10
  129. Name: text2
  130. Balloon: This demonstrates the equivalent.
  131.  
  132. ItemType: LINE
  133. Rect: 28,171,268,172
  134.  
  135. ItemType: LBL
  136. Rect: 98,3,213,15
  137. TextFont: Geneva
  138. TextSize: 9
  139. Text: (e.g., Gold, Yen, Pounds)
  140.  
  141. ItemType: TEXT
  142. Rect: 0,35,74,104
  143. TextFont: Geneva
  144. TextSize: 9
  145. AutoSize: FALSE
  146. Name: instr6
  147. TextAlign: Right
  148. Text: Changing the equivalent value will update all details of this type
  149.  
  150. ItemType: TEXT
  151. Rect: 291,5,488,222
  152. TextFont: Geneva
  153. TextSize: 9
  154. AutoSize: FALSE
  155. Name: HelpText
  156. Text: Ñ Click on a type in the list (or create a new type), then use the ╥Equivalents╙ section to tell the stack how to convert your asset value into your usual currency.┬Ñ The upper Equivalent field is to enter the number of items of this type that are equal to ONE unit of your currency. For example, if 97 Yen equals ONE dollar (and your native currency is dollars), enter 97 into the upper field after activating it with its radio button.┬Ñ The lower Equivalent field is to enter the number of units of your currency that are equal to ONE item of this type. For example, if ONE ounce of gold equals 375 dollars (and your native currency is dollars), enter 375 into this field.
  157.  
  158. ItemType: CNTL
  159. Rect: 216,3,262,16
  160. TextFont: Geneva
  161. TextSize: 10
  162. Name: Help
  163. Style: 480
  164. Min: 0
  165. Max: 100
  166. Value: 0
  167. Step: 1
  168. Leap: 10
  169. Script: get wsGet(wdID,"Help","Hilite")┬wsSet wdID,"Help","Hilite",not it┬get wsGet(wdID,"Help","Hilite")┬if it=false then┬  wsSet wdID,"Conversions","Width", "278"┬  wsSet wdID,"Conversions","TopLeft",wstl(278,220)┬else┬  wsSet wdID,"Conversions","Width", "492"┬  wsSet wdID,"Conversions","TopLeft",wstl(492,220)┬end if┬